import java.util.Scanner;

public class Training09 {
    public static void main(String[] args) {
        statistics();

    }
    public static void  statistics(){
        System.out.println("请输入班级人数");
        Scanner scl = new Scanner(System.in);
        int grades = scl.nextInt();
        double num =0 ;
        int[] arr = new int[grades] ;
        for (int i = 0; i <grades ; i++) {
            System.out.println("请输入学号是"+i+"学生的成绩:");
            arr[i] = scl.nextInt();
            num = num +arr[i];
        }
        num=num/grades;
        System.out.println("全班平均成绩为:"+num);
        int c=0,b=0,a=0,d =0;

        for (int j = 0; j < arr.length; j++) {
            if (arr[j]>=80) {
                c++;
            }else if (arr[j] >=70) {
                b++;
            }else if (arr[j] >=60) {
                a++;
            }else if (arr[j]<60){
                d++;
            }
        }
        System.out.println("成绩大于80分："+c);
        System.out.println("成绩大于70分："+b);
        System.out.println("成绩大于60分："+a);
        System.out.println("成绩不及格人数："+d);
    }
}
